package com.peng.mvvm_wan.net

import com.peng.mvvm_wan.beans.BaseResp
import com.peng.mvvm_wan.beans.LoginBean
import com.peng.mvvm_wan.beans.SearchResult
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query

interface RequestApi {

    @POST("/user/login")
    suspend fun requestLogin(
        @Query("username") username: String,
        @Query("password") password: String
    ): BaseResp<LoginBean>

    @POST("/article/query/{pageNum}/json")
    suspend fun requestSearch(
        @Path("pageNum") pageNum:Int,
        @Query("k") keyWord:String
    ): BaseResp<SearchResult>

}